package com.hapzxb.consumer.service;

import com.hapzxb.consumer.bean.Department;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 *  指定当前Service所绑定的提供者微服务名称
 */
@FeignClient("msc-provider-department")
@RequestMapping("provider/department")
public interface DepartmentService {
    @PostMapping("/save")
    boolean saveDepartment(Department department);

    @PostMapping("/del/{id}")
    boolean removeDepartment(@PathVariable("id")int id);

    @PostMapping("/update")
    boolean modifyDepart(Department department);

    @PostMapping("/get/{id}")
    Department getDepartmentById(@PathVariable("id") int id);

    @PostMapping("/list")
    List<Department> listAllDepartment();



}
